package com.goldze.mvvmhabit.utils;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.RoundedCorners;
import com.bumptech.glide.request.RequestOptions;
import com.youth.banner.loader.ImageLoader;

public class GlideImageLoader extends ImageLoader {

    @Override
    public void displayImage(Context context, Object path, ImageView imageView) {
        Glide.with(context).load(path).apply(new RequestOptions()
                .transforms(new RoundedCorners(10)
                )).into(imageView);
        imageView.setScaleType(ImageView.ScaleType.FIT_XY);
    }
}
